package com.xjd.edu.common.model.login;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.xjd.edu.common.admin.domain.SysUser;
import com.xjd.edu.common.entity.User;
import lombok.Data;

import java.util.Date;
import java.util.Set;

/**
 * @author wangyu
 * @description:
 * @date 2025-01-23 18:21:49
 */
@Data
public class LoginResult {

    private User user;

    private String token;

    private String deviceCert;

    private Integer id;

    private Integer userId;

    private String mobile;



    private Integer type;

    private boolean isCancel;

    private String userCode;//用户编号


    /*==================== admin使用 ================================*/
    private String name;

    private String username;

    @JsonIgnore
    private String password;

    @JsonIgnore
    private String salt;

    private Integer status;

    private String imPwd;

    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date createTime;

    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date updateTime;

    private Integer roleId;

    private String roleName;

    private String adminName;


    /**
     * 登录时间
     */
    private Long loginTime;

    /**
     * 过期时间
     */
    private Long expireTime;

    /**
     * 登录IP地址
     */
    private String ipaddr;

    /**
     * 权限列表
     */
    private Set<String> permissions;

    /**
     * 角色列表
     */
    private Set<String> roles;

    /**
     * 用户信息
     */
    private SysUser sysUser;
}
